fix tr vulnerabilities and exploits

(subscribe to this query)